/**
 * 
 */
package org.ourguy.mymoviesandshows.datamodel;

import java.net.MalformedURLException;
import java.net.URL;

/**
 * @author ignisf
 *
 */
public class SeasonInfo implements Comparable<SeasonInfo> {
	private int seasonNumber;
	private int episodeCount;
	private URL url;
	private ICoverArt image;
	
	public SeasonInfo(int seasonNumber, int episodeCount) {
		this.seasonNumber = seasonNumber;
		this.episodeCount = episodeCount;
	}

	public SeasonInfo(int seasonNumber) {
		this.seasonNumber = seasonNumber;
	}
	
	public int compareTo(SeasonInfo another) {
		return new Integer(seasonNumber).compareTo(another.getNumber());
	}

	public int getNumber() {
		return seasonNumber;
	}
	
	public void setEpisodeCount(int episodeCount) {
		this.episodeCount = episodeCount;
	}
	
	public int getEpisodeCount() {
		return episodeCount;
	}
	
	public void setURL(String url) throws MalformedURLException {
		this.url = new URL(url);
	}
	
	public URL getURL() {
		return url;
	}
	
	public void setImage(String url) throws MalformedURLException {
		this.image = new CoverArtFromURL(url);
	}
	
	public ICoverArt getImage() {
		return this.image;
	}
}
